package org.kernely.core.service;

import java.util.List;


/**
 * Provides all bundle management methods
 */
public interface KernelyBundleService {
	
	/**
	 * Add a bundle into the application.
	 * @param module The bundle to add.
	 */
	void registerModule(KernelyBundle module);
	
	/**
	 * Remove a bundle from the application.
	 * @param module The bundle to remove.
	 */
	void unregisterModule(KernelyBundle module);
	
	/**
	 * Returns the list of bundles detected in the application.
	 * @return The list of the bundles.
	 */
	List<KernelyBundle> getModules();
	
	/**
	 * Add a listener to the application.
	 * @param listener The listener to add.
	 */
	void addListener(KernelyBundleServiceListener listener);
	
	/**
	 * Removes a listener from the application.
	 * @param listener The listener to remove.
	 */
	void removeListener(KernelyBundleServiceListener listener);	
}

